﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using KKSG;
using UILib;
using UnityEngine;
using XMainClient.UI;
using XMainClient.UI.Battle;
using XMainClient.UI.UICommon;
using XUpdater;
using XUtliPoolLib;

public sealed class PrivateImplementationDetails
{
	// Token: 0x06010F8B RID: 69515 RVA: 0x00451C30 File Offset: 0x0044FE30
	public static uint ComputeStringHash(string s)
	{
		uint num = 0;
		if (s != null)
		{
			num = 2166136261U;
			for (int i = 0; i < s.Length; i++)
			{
				num = ((uint)s[i] ^ num) * 16777619U;
			}
		}
		return num;
	}
}

namespace XMainClient
{
	// Token: 0x02000E96 RID: 3734
	public class XCommand : XSingleton<XCommand>
	{
		// Token: 0x0600C74E RID: 51022 RVA: 0x002C382C File Offset: 0x002C1A2C
		public bool ProcessCommand(string command)
		{
			string[] array = command.Split(new char[]
			{
				' '
			});
			string text = array[0];
			bool result = true;
			string text2 = text;
			uint num = PrivateImplementationDetails.ComputeStringHash(text2);
			if (num <= 1738168302U)
			{
				if (num <= 1148745628U)
				{
					if (num <= 440395441U)
					{
						if (num <= 274900859U)
						{
							if (num <= 88104725U)
							{
								if (num != 11041011U)
								{
									if (num != 65180808U)
									{
										if (num != 88104725U)
										{
											goto IL_33E4;
										}
										if (!(text2 == "inquirylevelseal"))
										{
											goto IL_33E4;
										}
										XLevelSealDocument specificDocument = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
										DlgBase<DemoUI, DemoUIBehaviour>.singleton.AddMessage(specificDocument.SealType.ToString());
										goto IL_340B;
									}
									else
									{
										if (!(text2 == "sendflower"))
										{
											goto IL_33E4;
										}
										ulong roleid = ulong.Parse(array[1]);
										uint count = uint.Parse(array[2]);
										RpcC2G_SendFlower rpcC2G_SendFlower = new RpcC2G_SendFlower();
										rpcC2G_SendFlower.oArg.roleid = roleid;
										rpcC2G_SendFlower.oArg.count = count;
										XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SendFlower);
										goto IL_340B;
									}
								}
								else
								{
									if (!(text2 == "compose"))
									{
										goto IL_33E4;
									}
									bool flag = array.Length > 1;
									if (flag)
									{
										RpcC2G_UseItem rpcC2G_UseItem = new RpcC2G_UseItem();
										rpcC2G_UseItem.oArg.uid = (ulong)uint.Parse(array[1]);
										rpcC2G_UseItem.oArg.count = 1U;
										rpcC2G_UseItem.oArg.OpType = ItemUseMgr.GetItemUseValue(ItemUse.Composite);
										XSingleton<XClientNetwork>.singleton.Send(rpcC2G_UseItem);
									}
									goto IL_340B;
								}
							}
							else if (num != 93523792U)
							{
								if (num != 200425548U)
								{
									if (num != 274900859U)
									{
										goto IL_33E4;
									}
									if (!(text2 == "guildhall"))
									{
										goto IL_33E4;
									}
									DlgBase<XGuildHallView, XGuildHallBehaviour>.singleton.SetVisibleWithAnimation(true, null);
									goto IL_340B;
								}
								else
								{
									if (!(text2 == "pandora"))
									{
										goto IL_33E4;
									}
									XSingleton<XPandoraSDKDocument>.singleton.PandoraOnJsonEvent(array[1]);
									goto IL_340B;
								}
							}
							else
							{
								if (!(text2 == "changepro"))
								{
									goto IL_33E4;
								}
								RpcC2G_ChangeProfession rpcC2G_ChangeProfession = new RpcC2G_ChangeProfession();
								rpcC2G_ChangeProfession.oArg.pro = uint.Parse(array[1]);
								XSingleton<XClientNetwork>.singleton.Send(rpcC2G_ChangeProfession);
								goto IL_340B;
							}
						}
						else if (num <= 327549200U)
						{
							if (num != 279460018U)
							{
								if (num != 280052408U)
								{
									if (num != 327549200U)
									{
										goto IL_33E4;
									}
									if (!(text2 == "invite"))
									{
										goto IL_33E4;
									}
									bool flag2 = array.Length >= 2;
									if (flag2)
									{
										ulong[] array2 = null;
										bool flag3 = array.Length >= 3;
										if (flag3)
										{
											array2 = new ulong[array.Length - 2];
											for (int i = 2; i < array.Length; i++)
											{
												array2[i - 2] = ulong.Parse(array[i]);
											}
										}
										XInvitationDocument specificDocument2 = XDocuments.GetSpecificDocument<XInvitationDocument>(XInvitationDocument.uuID);
										specificDocument2.SendOpenSysInvitation((XSysDefine)int.Parse(array[1]), array2);
									}
									goto IL_340B;
								}
								else
								{
									if (!(text2 == "sscale"))
									{
										goto IL_33E4;
									}
									bool flag4 = array.Length == 2;
									if (flag4)
									{
										float num2 = float.Parse(array[1]);
										float num3 = 1136f * num2;
										float num4 = 640f * num2;
										Screen.SetResolution((int)num3, (int)num4, true);
									}
									goto IL_340B;
								}
							}
							else
							{
								if (!(text2 == "attr"))
								{
									goto IL_33E4;
								}
								bool flag5 = !XSingleton<XGame>.singleton.SyncMode;
								if (flag5)
								{
									bool flag6 = array.Length >= 3;
									if (flag6)
									{
										int attrKey = int.Parse(array[1]);
										int num5 = int.Parse(array[2]);
										bool flag7 = array.Length == 3;
										XEntity xentity;
										if (flag7)
										{
											xentity = XSingleton<XEntityMgr>.singleton.Player;
										}
										else
										{
											ulong id = ulong.Parse(array[3]);
											xentity = XSingleton<XEntityMgr>.singleton.GetEntity(id);
										}
										bool flag8 = xentity != null;
										if (flag8)
										{
											XAttrChangeEventArgs xattrChangeEventArgs = new XAttrChangeEventArgs();
											xattrChangeEventArgs.AttrKey = (XAttributeDefine)attrKey;
											xattrChangeEventArgs.DeltaValue = (double)num5;
											xattrChangeEventArgs.Firer = xentity;
											XSingleton<XEventMgr>.singleton.FireEvent(xattrChangeEventArgs);
										}
									}
									goto IL_340B;
								}
								goto IL_33E4;
							}
						}
						else if (num <= 388948835U)
						{
							if (num != 372738696U)
							{
								if (num != 388948835U)
								{
									goto IL_33E4;
								}
								if (!(text2 == "setminimapsize"))
								{
									goto IL_33E4;
								}
								DlgBase<BattleMain, BattleMainBehaviour>.singleton.IndicateHandler.SetMiniMapSize(new Vector2(float.Parse(array[1]), float.Parse(array[2])), (array.Length > 3) ? float.Parse(array[3]) : 0f);
								goto IL_340B;
							}
							else
							{
								if (!(text2 == "print"))
								{
									goto IL_33E4;
								}
								XSingleton<XDebug>.singleton.Print();
								goto IL_340B;
							}
						}
						else if (num != 392118284U)
						{
							if (num != 440395441U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "blackwhite"))
							{
								goto IL_33E4;
							}
							XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.BlackWhite, true);
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "addfriend"))
							{
								goto IL_33E4;
							}
							ulong friendroleid = ulong.Parse(array[1]);
							RpcC2M_AddFriendNew rpcC2M_AddFriendNew = new RpcC2M_AddFriendNew();
							rpcC2M_AddFriendNew.oArg.friendroleid = friendroleid;
							XSingleton<XClientNetwork>.singleton.Send(rpcC2M_AddFriendNew);
							goto IL_340B;
						}
					}
					else if (num <= 722777557U)
					{
						if (num <= 591033967U)
						{
							if (num != 497501987U)
							{
								if (num != 580838260U)
								{
									if (num != 591033967U)
									{
										goto IL_33E4;
									}
									if (!(text2 == "officialversionserver"))
									{
										goto IL_33E4;
									}
									bool flag9 = File.Exists(Path.Combine(Application.persistentDataPath, "TEST_VERSION"));
									if (flag9)
									{
										File.Delete(Path.Combine(Application.persistentDataPath, "TEST_VERSION"));
									}
									goto IL_340B;
								}
								else
								{
									if (!(text2 == "clientaddpk"))
									{
										goto IL_33E4;
									}
									RpcC2M_PkReqC2M rpcC2M_PkReqC2M = new RpcC2M_PkReqC2M();
									rpcC2M_PkReqC2M.oArg.type = PkReqType.PKREQ_ADDPK;
									XSingleton<XClientNetwork>.singleton.Send(rpcC2M_PkReqC2M);
									goto IL_340B;
								}
							}
							else
							{
								if (!(text2 == "gyrooff"))
								{
									goto IL_33E4;
								}
								XSingleton<XGyroscope>.singleton.Enabled = false;
								goto IL_340B;
							}
						}
						else if (num <= 667630371U)
						{
							if (num != 601516746U)
							{
								if (num != 667630371U)
								{
									goto IL_33E4;
								}
								if (!(text2 == "close"))
								{
									goto IL_33E4;
								}
								XSingleton<XClientNetwork>.singleton.Close(NetErrCode.Net_NoError);
								goto IL_340B;
							}
							else
							{
								if (!(text2 == "unloadbundle"))
								{
									goto IL_33E4;
								}
								XSingleton<XUpdater.XUpdater>.singleton.ABManager.UnloadNotUsedLoader();
								goto IL_340B;
							}
						}
						else if (num != 680877751U)
						{
							if (num != 722777557U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "targetframe"))
							{
								goto IL_33E4;
							}
							bool flag10 = Application.targetFrameRate != XShell.TargetFrame;
							if (flag10)
							{
								Application.targetFrameRate = XShell.TargetFrame;
							}
							else
							{
								Application.targetFrameRate = -1;
							}
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "levelover"))
							{
								goto IL_33E4;
							}
							XSingleton<XScene>.singleton.ReqLeaveScene();
							goto IL_340B;
						}
					}
					else if (num <= 781696470U)
					{
						if (num != 766741408U)
						{
							if (num != 774867328U)
							{
								if (num != 781696470U)
								{
									goto IL_33E4;
								}
								if (!(text2 == "testskill"))
								{
									goto IL_33E4;
								}
								XSingleton<XSkillEffectMgr>.singleton.TestSkillTable();
								goto IL_340B;
							}
							else
							{
								if (!(text2 == "suit"))
								{
									goto IL_33E4;
								}
								int suitID = int.Parse(array[1]);
								XFashionDocument specificDocument3 = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
								specificDocument3.EquipSuit(suitID);
								goto IL_340B;
							}
						}
						else
						{
							if (!(text2 == "listbuff"))
							{
								goto IL_33E4;
							}
							bool flag11 = !XSingleton<XGame>.singleton.SyncMode;
							if (flag11)
							{
								bool flag12 = array.Length >= 2;
								ulong id2;
								if (flag12)
								{
									id2 = ulong.Parse(array[1]);
								}
								else
								{
									id2 = XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
								}
								XEntity entity = XSingleton<XEntityMgr>.singleton.GetEntity(id2);
								bool flag13 = entity != null && entity.Buffs != null;
								if (flag13)
								{
									XSingleton<XCommon>.singleton.CleanStringCombine();
									StringBuilder sharedStringBuilder = XSingleton<XCommon>.singleton.GetSharedStringBuilder();
									List<XBuff> buffList = entity.Buffs.BuffList;
									for (int j = 0; j < buffList.Count; j++)
									{
										sharedStringBuilder.Append("[").Append(buffList[j].ID).Append(":").Append(buffList[j].Level).Append("]");
									}
									DlgBase<DemoUI, DemoUIBehaviour>.singleton.AddMessage(sharedStringBuilder.ToString());
								}
								goto IL_340B;
							}
							goto IL_33E4;
						}
					}
					else if (num <= 936667975U)
					{
						if (num != 916869054U)
						{
							if (num != 936667975U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "addblack"))
							{
								goto IL_33E4;
							}
							RpcC2M_AddBlackListNew rpcC2M_AddBlackListNew = new RpcC2M_AddBlackListNew();
							rpcC2M_AddBlackListNew.oArg.otherroleid = ulong.Parse(array[1]);
							XSingleton<XClientNetwork>.singleton.Send(rpcC2M_AddBlackListNew);
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "clearguildcollectCD"))
							{
								goto IL_33E4;
							}
							XGuildCollectDocument specificDocument4 = XDocuments.GetSpecificDocument<XGuildCollectDocument>(XGuildCollectDocument.uuID);
							specificDocument4.LotteryCDInfo.Clear();
							goto IL_340B;
						}
					}
					else if (num != 1064815245U)
					{
						if (num != 1148745628U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "gausblur"))
						{
							goto IL_33E4;
						}
						XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, true);
						goto IL_340B;
					}
					else
					{
						if (!(text2 == "free3g"))
						{
							goto IL_33E4;
						}
						AdditionRemindDocument specificDocument5 = XDocuments.GetSpecificDocument<AdditionRemindDocument>(AdditionRemindDocument.uuID);
						specificDocument5.gm_is_3g = true;
						goto IL_340B;
					}
				}
				else if (num <= 1493544360U)
				{
					if (num <= 1355973766U)
					{
						if (num <= 1228828494U)
						{
							if (num != 1200064310U)
							{
								if (num != 1209769725U)
								{
									if (num != 1228828494U)
									{
										goto IL_33E4;
									}
									if (!(text2 == "randomfriend"))
									{
										goto IL_33E4;
									}
									string match = array[1];
									RpcC2M_RandomFriendWaitListNew rpcC2M_RandomFriendWaitListNew = new RpcC2M_RandomFriendWaitListNew();
									rpcC2M_RandomFriendWaitListNew.oArg.match = match;
									XSingleton<XClientNetwork>.singleton.Send(rpcC2M_RandomFriendWaitListNew);
									goto IL_340B;
								}
								else if (!(text2 == "god"))
								{
									goto IL_33E4;
								}
							}
							else
							{
								if (!(text2 == "quit"))
								{
									goto IL_33E4;
								}
								Application.Quit();
								goto IL_340B;
							}
						}
						else if (num <= 1272528970U)
						{
							if (num != 1244307660U)
							{
								if (num != 1272528970U)
								{
									goto IL_33E4;
								}
								if (!(text2 == "cinfo"))
								{
									goto IL_33E4;
								}
								XFileLog._OpenCustomBtn = !XFileLog._OpenCustomBtn;
								goto IL_340B;
							}
							else
							{
								if (!(text2 == "buff"))
								{
									goto IL_33E4;
								}
								bool syncMode = XSingleton<XGame>.singleton.SyncMode;
								if (syncMode)
								{
									goto IL_33E4;
								}
								XBuffAddEventArgs xbuffAddEventArgs = XEventPool<XBuffAddEventArgs>.GetEvent();
								bool flag14 = array.Length >= 3;
								if (flag14)
								{
									xbuffAddEventArgs.xBuffDesc.BuffID = int.Parse(array[1]);
									xbuffAddEventArgs.xBuffDesc.BuffLevel = int.Parse(array[2]);
									xbuffAddEventArgs.xBuffDesc.CasterID = XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
									bool flag15 = array.Length >= 4;
									ulong id3;
									if (flag15)
									{
										bool flag16 = array[3].StartsWith("t");
										if (flag16)
										{
											xbuffAddEventArgs.xBuffDesc.EffectTime = float.Parse(array[3].Substring(1));
											bool flag17 = array.Length >= 5;
											if (flag17)
											{
												id3 = ulong.Parse(array[4]);
											}
											else
											{
												id3 = XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
											}
										}
										else
										{
											id3 = ulong.Parse(array[3]);
										}
									}
									else
									{
										id3 = XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
									}
									XEntity entity2 = XSingleton<XEntityMgr>.singleton.GetEntity(id3);
									bool flag18 = entity2 != null;
									if (flag18)
									{
										xbuffAddEventArgs.Firer = entity2;
										XSingleton<XEventMgr>.singleton.FireEvent(xbuffAddEventArgs);
										xbuffAddEventArgs = null;
									}
								}
								bool flag19 = xbuffAddEventArgs != null;
								if (flag19)
								{
									xbuffAddEventArgs.Recycle();
								}
								goto IL_340B;
							}
						}
						else if (num != 1343365414U)
						{
							if (num != 1355973766U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "gyro"))
							{
								goto IL_33E4;
							}
							float num6 = 0f;
							float num7 = 0f;
							float num8 = 0f;
							bool flag20 = array.Length > 1;
							if (flag20)
							{
								float.TryParse(array[1], out num6);
							}
							bool flag21 = array.Length > 2;
							if (flag21)
							{
								float.TryParse(array[2], out num7);
							}
							bool flag22 = array.Length > 3;
							if (flag22)
							{
								float.TryParse(array[3], out num8);
							}
							bool flag23 = num6 == 0f;
							if (flag23)
							{
								num6 = XSingleton<XGyroscope>.singleton.Scale;
							}
							bool flag24 = num7 == 0f;
							if (flag24)
							{
								num7 = XSingleton<XGyroscope>.singleton.DeadZone;
							}
							bool flag25 = num8 == 0f;
							if (flag25)
							{
								num8 = XSingleton<XGyroscope>.singleton.Frequency;
							}
							XSingleton<XGyroscope>.singleton.Set(num6, num8, num7);
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "equipall"))
							{
								goto IL_33E4;
							}
							XBagDocument xbagDoc = XSingleton<XGame>.singleton.Doc.XBagDoc;
							xbagDoc.GetAllEquip();
							goto IL_340B;
						}
					}
					else if (num <= 1410630901U)
					{
						if (num != 1361793415U)
						{
							if (num != 1367618275U)
							{
								if (num != 1410630901U)
								{
									goto IL_33E4;
								}
								if (!(text2 == "battleqte"))
								{
									goto IL_33E4;
								}
								DlgBase<BattleQTEDlg, BattleQTEDlgBehaviour>.singleton.SetStatus(QteUIType.Abnormal, true);
								goto IL_340B;
							}
							else
							{
								if (!(text2 == "sweep"))
								{
									goto IL_33E4;
								}
								RpcC2G_Sweep rpcC2G_Sweep = new RpcC2G_Sweep();
								rpcC2G_Sweep.oArg.sceneID = uint.Parse(array[1]);
								rpcC2G_Sweep.oArg.count = uint.Parse(array[2]);
								XSingleton<XClientNetwork>.singleton.Send(rpcC2G_Sweep);
								goto IL_340B;
							}
						}
						else
						{
							if (!(text2 == "getwindow"))
							{
								goto IL_33E4;
							}
							string str = array[1];
							string childName = array[2];
							GameObject gameObject = GameObject.Find("UIRoot/" + str + "(Clone)");
							bool flag26 = gameObject == null;
							if (flag26)
							{
								DlgBase<DemoUI, DemoUIBehaviour>.singleton.AddMessage("dlg not found!");
								return true;
							}
							Transform transform = XSingleton<UiUtility>.singleton.FindChild(gameObject.transform, childName);
							bool flag27 = transform == null;
							if (flag27)
							{
								DlgBase<DemoUI, DemoUIBehaviour>.singleton.AddMessage("window not found!");
								return true;
							}
							DlgBase<DemoUI, DemoUIBehaviour>.singleton.AddMessage(string.Concat(new object[]
							{
								"target window position: (",
								transform.localPosition.x,
								",",
								transform.localPosition.y,
								",",
								transform.localPosition.z,
								")"
							}));
							IXUISprite ixuisprite = transform.GetComponent("XUISprite") as IXUISprite;
							bool flag28 = ixuisprite != null;
							if (flag28)
							{
								DlgBase<DemoUI, DemoUIBehaviour>.singleton.AddMessage(string.Concat(new object[]
								{
									"target window size: ",
									ixuisprite.spriteWidth,
									"x",
									ixuisprite.spriteHeight
								}));
							}
							goto IL_340B;
						}
					}
					else if (num <= 1456084084U)
					{
						if (num != 1431043365U)
						{
							if (num != 1456084084U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "getdesall"))
							{
								goto IL_33E4;
							}
							XDesignationDocument specificDocument6 = XDocuments.GetSpecificDocument<XDesignationDocument>(XDesignationDocument.uuID);
							for (int k = 1; k < specificDocument6._DesignationTable.Table.Length; k++)
							{
								RpcC2G_GMCommand rpcC2G_GMCommand = new RpcC2G_GMCommand();
								rpcC2G_GMCommand.oArg.cmd = string.Format("getdesignation {0}", specificDocument6._DesignationTable.Table[k].ID);
								XSingleton<XClientNetwork>.singleton.Send(rpcC2G_GMCommand);
							}
							result = true;
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "generatefiles"))
							{
								goto IL_33E4;
							}
							int num9 = 0;
							int.TryParse(array[1], out num9);
							XSingleton<XChatIFlyMgr>.singleton.GenerateAudioFiles(num9);
							goto IL_340B;
						}
					}
					else if (num != 1488615049U)
					{
						if (num != 1493544360U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "queryrolestate"))
						{
							goto IL_33E4;
						}
						PtcC2M_RoleStateReportNew ptcC2M_RoleStateReportNew = new PtcC2M_RoleStateReportNew();
						for (int l = 0; l < array.Length; l++)
						{
							ptcC2M_RoleStateReportNew.Data.roleid.Add(ulong.Parse(array[l]));
						}
						XSingleton<XClientNetwork>.singleton.Send(ptcC2M_RoleStateReportNew);
						goto IL_340B;
					}
					else
					{
						if (!(text2 == "opengamezone"))
						{
							goto IL_33E4;
						}
						bool flag29 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.IsVisible();
						if (flag29)
						{
							DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.uiBehaviour.GetSysButton(XSysDefine.XSys_GameCommunity).SetVisible(true);
							DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.uiBehaviour.m_SysListV2.Refresh();
						}
						goto IL_340B;
					}
				}
				else if (num <= 1625305005U)
				{
					if (num <= 1510374019U)
					{
						if (num != 1496340684U)
						{
							if (num != 1508461632U)
							{
								if (num != 1510374019U)
								{
									goto IL_33E4;
								}
								if (!(text2 == "buildlog"))
								{
									goto IL_33E4;
								}
								XSingleton<XGame>.singleton.ShowBuildLog = !XSingleton<XGame>.singleton.ShowBuildLog;
								goto IL_340B;
							}
							else
							{
								if (!(text2 == "damage"))
								{
									goto IL_33E4;
								}
								bool syncMode2 = XSingleton<XGame>.singleton.SyncMode;
								if (syncMode2)
								{
									goto IL_33E4;
								}
								bool flag30 = array.Length >= 2;
								if (flag30)
								{
									bool flag31 = array[1] == "start";
									if (flag31)
									{
										bool flag32 = array.Length >= 3;
										if (flag32)
										{
											float num10 = float.Parse(array[2]);
										}
										XSingleton<XAttributeMgr>.singleton.XPlayerData.TogglePrintDamage(true);
									}
									else
									{
										bool flag33 = array[1] == "end";
										if (flag33)
										{
											XSingleton<XAttributeMgr>.singleton.XPlayerData.TogglePrintDamage(false);
										}
									}
								}
								goto IL_340B;
							}
						}
						else
						{
							if (!(text2 == "record"))
							{
								goto IL_33E4;
							}
							int num11 = int.Parse(array[1]);
							XDebug.RecordChannel channel = (XDebug.RecordChannel)int.Parse(array[2]);
							bool flag34 = num11 == 1;
							if (flag34)
							{
								XSingleton<XDebug>.singleton.StartRecord(channel);
							}
							else
							{
								bool flag35 = num11 == 0;
								if (flag35)
								{
									XSingleton<XDebug>.singleton.EndRecord();
								}
								else
								{
									bool flag36 = num11 == 2;
									if (flag36)
									{
										XSingleton<XDebug>.singleton.ClearRecord();
									}
								}
							}
							goto IL_340B;
						}
					}
					else if (num <= 1594484382U)
					{
						if (num != 1567532425U)
						{
							if (num != 1594484382U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "listattr"))
							{
								goto IL_33E4;
							}
							bool flag37 = !XSingleton<XGame>.singleton.SyncMode;
							if (flag37)
							{
								bool flag38 = array.Length >= 2;
								if (flag38)
								{
									ulong num12 = ulong.Parse(array[1]);
									bool flag39 = num12 == 0UL;
									if (flag39)
									{
										num12 = XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
									}
									XEntity entity3 = XSingleton<XEntityMgr>.singleton.GetEntity(num12);
									bool flag40 = entity3 != null && entity3.Attributes != null;
									if (flag40)
									{
										List<int> list = ListPool<int>.Get();
										for (int m = 2; m < array.Length; m++)
										{
											list.Add(int.Parse(array[m]));
										}
										bool flag41 = list.Count == 0;
										if (flag41)
										{
											for (int n = 1; n < XAttributeCommon.AttrCount; n++)
											{
												list.Add(n);
												list.Add(n + XAttributeCommon.PercentStart);
												list.Add(n + XAttributeCommon.TotalStart);
											}
										}
										XSingleton<XCommon>.singleton.CleanStringCombine();
										StringBuilder sharedStringBuilder2 = XSingleton<XCommon>.singleton.GetSharedStringBuilder();
										for (int num13 = 0; num13 < list.Count; num13++)
										{
											double attr = entity3.Attributes.GetAttr((XAttributeDefine)list[num13]);
											bool flag42 = Math.Abs(attr) < 0.0001;
											if (!flag42)
											{
												sharedStringBuilder2.Append("[").Append(list[num13]).Append(": ").Append(attr.ToString("F2")).Append("]\n");
											}
										}
										DlgBase<DemoUI, DemoUIBehaviour>.singleton.AddMessage(sharedStringBuilder2.ToString());
									}
								}
								goto IL_340B;
							}
							goto IL_33E4;
						}
						else
						{
							if (!(text2 == "TopTask"))
							{
								goto IL_33E4;
							}
							bool flag43 = array.Length >= 2;
							if (flag43)
							{
								XTaskDocument specificDocument7 = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
								specificDocument7.SetHighestPriorityTask(uint.Parse(array[1]));
							}
							goto IL_340B;
						}
					}
					else if (num != 1608088380U)
					{
						if (num != 1625305005U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "hide"))
						{
							goto IL_33E4;
						}
						bool flag44 = array.Length > 1;
						if (flag44)
						{
							GameObject[] array3 = (GameObject[])Resources.FindObjectsOfTypeAll(typeof(GameObject));
							for (int num14 = 0; num14 < array3.Length; num14++)
							{
								bool flag45 = array3[num14].name == array[1];
								if (flag45)
								{
									array3[num14].SetActive(!array3[num14].activeSelf);
								}
							}
						}
						goto IL_340B;
					}
					else
					{
						if (!(text2 == "tutorialend"))
						{
							goto IL_33E4;
						}
						PtcC2G_UpdateTutorial ptcC2G_UpdateTutorial = new PtcC2G_UpdateTutorial();
						for (int num15 = 1; num15 < array.Length; num15++)
						{
							ptcC2G_UpdateTutorial.Data.tutorialID = uint.Parse(array[num15]);
							XSingleton<XClientNetwork>.singleton.Send(ptcC2G_UpdateTutorial);
						}
						goto IL_340B;
					}
				}
				else if (num <= 1685119913U)
				{
					if (num != 1647561641U)
					{
						if (num != 1680627553U)
						{
							if (num != 1685119913U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "allskill"))
							{
								goto IL_33E4;
							}
							int num16 = (int)XSingleton<XGame>.singleton.Doc.XBagDoc.GetSkillPointCount(false);
							bool flag46 = num16 < 300;
							if (flag46)
							{
								this.ProcessCommand("item 2 800");
								this.ProcessCommand("item 5 800");
							}
							this.SkillLearn(null);
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "guildencourage"))
							{
								goto IL_33E4;
							}
							uint count2 = 0U;
							int num17 = 1;
							bool flag47 = array.Length > 1;
							if (flag47)
							{
								uint.TryParse(array[1], out count2);
							}
							bool flag48 = array.Length > 2;
							if (flag48)
							{
								int.TryParse(array[2], out num17);
							}
							for (int num18 = 0; num18 < num17; num18++)
							{
								RpcC2M_WorldBossGuildAddAttr rpcC2M_WorldBossGuildAddAttr = new RpcC2M_WorldBossGuildAddAttr();
								rpcC2M_WorldBossGuildAddAttr.oArg.count = count2;
								XSingleton<XClientNetwork>.singleton.Send(rpcC2M_WorldBossGuildAddAttr);
							}
							goto IL_340B;
						}
					}
					else
					{
						if (!(text2 == "levelslot"))
						{
							goto IL_33E4;
						}
						bool flag49 = array.Length == 3;
						if (flag49)
						{
							RpcC2G_LevelUpSlotAttr rpcC2G_LevelUpSlotAttr = new RpcC2G_LevelUpSlotAttr();
							rpcC2G_LevelUpSlotAttr.oArg.slot = uint.Parse(array[1]);
							rpcC2G_LevelUpSlotAttr.oArg.count = uint.Parse(array[2]);
							XSingleton<XClientNetwork>.singleton.Send(rpcC2G_LevelUpSlotAttr);
						}
						goto IL_340B;
					}
				}
				else if (num <= 1713047890U)
				{
					if (num != 1708488555U)
					{
						if (num != 1713047890U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "freetime"))
						{
							goto IL_33E4;
						}
						int logintime = int.Parse(array[1]);
						AdditionRemindDocument specificDocument8 = XDocuments.GetSpecificDocument<AdditionRemindDocument>(AdditionRemindDocument.uuID);
						specificDocument8.LOGINTIME = logintime;
						goto IL_340B;
					}
					else
					{
						if (!(text2 == "buy"))
						{
							goto IL_33E4;
						}
						RpcC2G_BuyGoldAndFatigue rpcC2G_BuyGoldAndFatigue = new RpcC2G_BuyGoldAndFatigue();
						rpcC2G_BuyGoldAndFatigue.oArg.fatigueID = uint.Parse(array[1]);
						XSingleton<XClientNetwork>.singleton.Send(rpcC2G_BuyGoldAndFatigue);
						goto IL_340B;
					}
				}
				else if (num != 1737033224U)
				{
					if (num != 1738168302U)
					{
						goto IL_33E4;
					}
					if (!(text2 == "hudnum"))
					{
						goto IL_33E4;
					}
					XHUDComponent._Max_UI_UpdateCount_PreFrame = int.Parse(array[1]);
					goto IL_340B;
				}
				else
				{
					if (!(text2 == "setxy"))
					{
						goto IL_33E4;
					}
					Screen.SetResolution(int.Parse(array[1]), int.Parse(array[2]), true);
					goto IL_340B;
				}
			}
			else if (num <= 3319670096U)
			{
				if (num <= 2556470705U)
				{
					if (num <= 2045478139U)
					{
						if (num <= 1922688807U)
						{
							if (num != 1758302155U)
							{
								if (num != 1789352652U)
								{
									if (num != 1922688807U)
									{
										goto IL_33E4;
									}
									if (!(text2 == "showblacklist"))
									{
										goto IL_33E4;
									}
									PtcC2M_BlackListReportNew proto = new PtcC2M_BlackListReportNew();
									XSingleton<XClientNetwork>.singleton.Send(proto);
									goto IL_340B;
								}
								else
								{
									if (!(text2 == "removeblack"))
									{
										goto IL_33E4;
									}
									RpcC2M_RemoveBlackListNew rpcC2M_RemoveBlackListNew = new RpcC2M_RemoveBlackListNew();
									rpcC2M_RemoveBlackListNew.oArg.otherroleid = ulong.Parse(array[1]);
									XSingleton<XClientNetwork>.singleton.Send(rpcC2M_RemoveBlackListNew);
									goto IL_340B;
								}
							}
							else
							{
								if (!(text2 == "showsystemui"))
								{
									goto IL_33E4;
								}
								bool flag50 = array.Length == 2;
								if (flag50)
								{
									XSingleton<XGameSysMgr>.singleton.OpenSystem((XSysDefine)int.Parse(array[1]), 0UL);
								}
								goto IL_340B;
							}
						}
						else if (num <= 1968698200U)
						{
							if (num != 1925156125U)
							{
								if (num != 1968698200U)
								{
									goto IL_33E4;
								}
								if (!(text2 == "inquirytutorial"))
								{
									goto IL_33E4;
								}
								int num19 = 0;
								int num20 = 10;
								StringBuilder stringBuilder = new StringBuilder();
								stringBuilder.Append((num19 + 1).ToString("000") + "-" + (num19 + num20).ToString("000") + ": ");
								for (int num21 = 0; num21 < XSingleton<XTutorialMgr>.singleton.TutorialBitsArray.Length; num21++)
								{
									byte b = XSingleton<XTutorialMgr>.singleton.TutorialBitsArray[num21];
									for (int num22 = 0; num22 < 8; num22++)
									{
										bool flag51 = ((int)b & 1 << num22) == 0;
										if (flag51)
										{
											stringBuilder.Append("0");
										}
										else
										{
											stringBuilder.Append("1");
										}
										num19++;
										bool flag52 = num19 % num20 == 0;
										if (flag52)
										{
											DlgBase<DemoUI, DemoUIBehaviour>.singleton.AddMessage(stringBuilder.ToString());
											stringBuilder = new StringBuilder();
											stringBuilder.Append((num19 + 1).ToString("000") + " " + (num19 + num20).ToString("000") + ":");
										}
									}
								}
								bool flag53 = num19 % num20 != 0;
								if (flag53)
								{
									DlgBase<DemoUI, DemoUIBehaviour>.singleton.AddMessage(stringBuilder.ToString());
								}
								goto IL_340B;
							}
							else if (!(text2 == "tutorialendcurall"))
							{
								goto IL_33E4;
							}
						}
						else if (num != 2038880671U)
						{
							if (num != 2045478139U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "hideT"))
							{
								goto IL_33E4;
							}
							bool flag54 = array.Length == 2;
							if (flag54)
							{
								int num23 = int.Parse(array[1]);
								GameObject gameObject2 = GameObject.Find("Scene/Terrain");
								bool flag55 = gameObject2 != null;
								if (flag55)
								{
									this.terrain = gameObject2;
								}
								bool flag56 = this.terrain != null;
								if (flag56)
								{
									this.terrain.SetActive(num23 > 0);
								}
							}
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "unloadassets"))
							{
								goto IL_33E4;
							}
							Resources.UnloadUnusedAssets();
							goto IL_340B;
						}
					}
					else if (num <= 2487212655U)
					{
						if (num != 2093821818U)
						{
							if (num != 2415043315U)
							{
								if (num != 2487212655U)
								{
									goto IL_33E4;
								}
								if (!(text2 == "bubble"))
								{
									goto IL_33E4;
								}
								XBubbleEventArgs @event = XEventPool<XBubbleEventArgs>.GetEvent();
								bool flag57 = array.Length >= 2;
								if (flag57)
								{
									@event.bubbletext = array[1];
								}
								bool flag58 = array.Length >= 3;
								if (flag58)
								{
									@event.existtime = float.Parse(array[2]);
								}
								bool flag59 = array.Length >= 4;
								if (flag59)
								{
									@event.Firer = XSingleton<XEntityMgr>.singleton.GetEntity(ulong.Parse(array[3]));
									@event.speaker = XSingleton<XEntityMgr>.singleton.GetEntity(ulong.Parse(array[3])).Name;
								}
								else
								{
									@event.Firer = XSingleton<XEntityMgr>.singleton.Player;
									@event.speaker = XSingleton<XEntityMgr>.singleton.Player.Name;
								}
								XBubbleComponent xbubbleComponent = @event.Firer.GetXComponent(XBubbleComponent.uuID) as XBubbleComponent;
								bool flag60 = xbubbleComponent == null;
								if (flag60)
								{
									XSingleton<XComponentMgr>.singleton.CreateComponent(@event.Firer, XBubbleComponent.uuID);
								}
								XSingleton<XEventMgr>.singleton.FireEvent(@event);
								goto IL_340B;
							}
							else if (!(text2 == "tca"))
							{
								goto IL_33E4;
							}
						}
						else
						{
							if (!(text2 == "themeopen"))
							{
								goto IL_33E4;
							}
							DlgBase<XThemeActivityView, XThemeActivityBehaviour>.singleton.debug = true;
							DlgBase<XThemeActivityView, XThemeActivityBehaviour>.singleton.SetVisibleWithAnimation(true, null);
							goto IL_340B;
						}
					}
					else if (num <= 2504763628U)
					{
						if (num != 2489139438U)
						{
							if (num != 2504763628U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "testversionserver"))
							{
								goto IL_33E4;
							}
							using (new StreamWriter(Path.Combine(Application.persistentDataPath, "TEST_VERSION")))
							{
								XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SetNoBackupFlag(Path.Combine(Application.persistentDataPath, "TEST_VERSION"));
							}
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "tutorialendcur"))
							{
								goto IL_33E4;
							}
							XSingleton<XTutorialMgr>.singleton.SkipCurrentTutorial(false);
							goto IL_340B;
						}
					}
					else if (num != 2544429414U)
					{
						if (num != 2556470705U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "notice"))
						{
							goto IL_33E4;
						}
						bool flag61 = array.Length >= 2;
						if (flag61)
						{
							ulong[] array4 = null;
							bool flag62 = array.Length >= 3;
							if (flag62)
							{
								array4 = new ulong[array.Length - 2];
								for (int num24 = 2; num24 < array.Length; num24++)
								{
									array4[num24 - 2] = ulong.Parse(array[num24]);
								}
							}
							XInvitationDocument specificDocument9 = XDocuments.GetSpecificDocument<XInvitationDocument>(XInvitationDocument.uuID);
							specificDocument9.SendOpenSysInvitation((NoticeType)int.Parse(array[1]), array4);
						}
						goto IL_340B;
					}
					else
					{
						if (!(text2 == "reconnect"))
						{
							goto IL_33E4;
						}
						XSingleton<XClientNetwork>.singleton.XConnect.ReconnectionEnabled = true;
						goto IL_340B;
					}
					XSingleton<XTutorialMgr>.singleton.SkipCurrentTutorial(true);
					goto IL_340B;
				}
				if (num <= 3020998307U)
				{
					if (num <= 2734521612U)
					{
						if (num != 2632689412U)
						{
							if (num != 2722888107U)
							{
								if (num != 2734521612U)
								{
									goto IL_33E4;
								}
								if (!(text2 == "team"))
								{
									goto IL_33E4;
								}
								DlgBase<XTeamView, TabDlgBehaviour>.singleton.ShowTeamView();
								goto IL_340B;
							}
							else
							{
								if (!(text2 == "chat"))
								{
									goto IL_33E4;
								}
								ulong item = ulong.Parse(array[1]);
								string info = array[2];
								RpcC2M_chat rpcC2M_chat = new RpcC2M_chat();
								rpcC2M_chat.oArg.chatinfo = new KKSG.ChatInfo();
								rpcC2M_chat.oArg.chatinfo.channel = 3U;
								rpcC2M_chat.oArg.chatinfo.info = info;
								rpcC2M_chat.oArg.chatinfo.dest = new ChatDest();
								rpcC2M_chat.oArg.chatinfo.dest.roleid.Add(item);
								for (int num25 = 0; num25 < 20; num25++)
								{
									XSingleton<XClientNetwork>.singleton.Send(rpcC2M_chat);
								}
								goto IL_340B;
							}
						}
						else
						{
							if (!(text2 == "custombattle"))
							{
								goto IL_33E4;
							}
							uint op = 0U;
							ulong uid = 0UL;
							uint configid = 0U;
							bool flag63 = array.Length > 1;
							if (flag63)
							{
								uint.TryParse(array[1], out op);
							}
							RpcC2M_CustomBattleOp rpcC2M_CustomBattleOp = new RpcC2M_CustomBattleOp();
							rpcC2M_CustomBattleOp.oArg.op = (CustomBattleOp)op;
							bool flag64 = array.Length > 2;
							if (flag64)
							{
								ulong.TryParse(array[2], out uid);
							}
							bool flag65 = rpcC2M_CustomBattleOp.oArg.op == CustomBattleOp.CustomBattle_Create;
							if (flag65)
							{
								bool flag66 = array.Length > 2;
								if (flag66)
								{
									uint.TryParse(array[2], out configid);
								}
							}
							rpcC2M_CustomBattleOp.oArg.uid = uid;
							rpcC2M_CustomBattleOp.oArg.config = new CustomBattleConfig();
							rpcC2M_CustomBattleOp.oArg.config.configid = configid;
							XSingleton<XClientNetwork>.singleton.Send(rpcC2M_CustomBattleOp);
							goto IL_340B;
						}
					}
					else if (num <= 3006960056U)
					{
						if (num != 2945169614U)
						{
							if (num != 3006960056U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "showflowerpage"))
							{
								goto IL_33E4;
							}
							ulong roleid2 = ulong.Parse(array[1]);
							RpcC2M_ShowFlowerPageNew rpcC2M_ShowFlowerPageNew = new RpcC2M_ShowFlowerPageNew();
							rpcC2M_ShowFlowerPageNew.oArg.roleid = roleid2;
							XSingleton<XClientNetwork>.singleton.Send(rpcC2M_ShowFlowerPageNew);
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "enable"))
							{
								goto IL_33E4;
							}
							bool flag67 = array.Length >= 3;
							if (flag67)
							{
								int num26 = int.Parse(array[1]);
								int num27 = int.Parse(array[2]);
								switch (num26)
								{
								case 1:
									XFxMgr.EmptyFx = (num27 != 0);
									break;
								case 2:
									XSingleton<XAudioMgr>.singleton.hasSound = (num27 != 0);
									break;
								case 3:
									XStateMachine._EnableAtor = (num27 != 0);
									break;
								case 4:
								{
									bool flag68 = num27 != 0;
									if (flag68)
									{
										XSingleton<XScene>.singleton.GameCamera.SetReplaceCameraShader(ShaderManager._color);
									}
									else
									{
										XSingleton<XScene>.singleton.GameCamera.SetReplaceCameraShader(null);
									}
									break;
								}
								}
							}
							goto IL_340B;
						}
					}
					else if (num != 3020023337U)
					{
						if (num != 3020998307U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "aitree"))
						{
							goto IL_33E4;
						}
						XRole xrole = XSingleton<XEntityMgr>.singleton.CreateRole(XSingleton<XAttributeMgr>.singleton.XPlayerData, XSingleton<XEntityMgr>.singleton.Player.MoveObj.Position, Quaternion.identity, false, false);
						XMount xmount = XSingleton<XEntityMgr>.singleton.CreateMount(12014U, xrole, true);
						XRole entity4 = XSingleton<XEntityMgr>.singleton.CreateRole(XSingleton<XAttributeMgr>.singleton.XPlayerData, XSingleton<XEntityMgr>.singleton.Player.MoveObj.Position, Quaternion.identity, false, false);
						bool flag69 = xrole.Mount.MountCopilot(entity4);
						XSingleton<XDebug>.singleton.AddLog(flag69.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
						string value = XSingleton<XGlobalConfig>.singleton.GetValue("WeddingPatrolAITree");
						bool flag70 = xrole.AI == null;
						if (flag70)
						{
							xrole.AI = (XSingleton<XComponentMgr>.singleton.CreateComponent(xrole, XAIComponent.uuID) as XAIComponent);
							xrole.AI.InitVariables();
							xrole.AI.SetFixVariables();
						}
						bool flag71 = xrole.Nav == null;
						if (flag71)
						{
							xrole.Nav = (XSingleton<XComponentMgr>.singleton.CreateComponent(xrole, XNavigationComponent.uuID) as XNavigationComponent);
							xrole.Nav.Active();
						}
						xrole.AI.Patrol.InitNavPath(XSingleton<XGlobalConfig>.singleton.GetValue("WeddingPatrolPath"), XPatrol.PathType.PT_NORMAL);
						xrole.AI.SetBehaviorTree(value);
						goto IL_340B;
					}
					else if (!(text2 == "tea"))
					{
						goto IL_33E4;
					}
				}
				else if (num <= 3230451497U)
				{
					if (num != 3133860241U)
					{
						if (num != 3173563725U)
						{
							if (num != 3230451497U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "killclientall"))
							{
								goto IL_33E4;
							}
							bool flag72 = array.Length > 1;
							if (flag72)
							{
								XSingleton<XAIOtherActions>.singleton.TickKillAll(array[1]);
							}
							else
							{
								XSingleton<XLevelSpawnMgr>.singleton.KillAllMonster();
							}
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "death"))
							{
								goto IL_33E4;
							}
							XSingleton<XEntityMgr>.singleton.Player.Attributes.ForceDeath();
							goto IL_340B;
						}
					}
					else
					{
						if (!(text2 == "bundlelog"))
						{
							goto IL_33E4;
						}
						AssetBundleManager.enableLog = !AssetBundleManager.enableLog;
						XFileLog._logBundleOpen = !XFileLog._logBundleOpen;
						goto IL_340B;
					}
				}
				else if (num <= 3277320633U)
				{
					if (num != 3272115138U)
					{
						if (num != 3277320633U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "guildcollectitem"))
						{
							goto IL_33E4;
						}
						for (int num28 = 8000; num28 < 8016; num28++)
						{
							this.ProcessCommand(string.Format("item {0} 20", num28));
						}
						goto IL_340B;
					}
					else
					{
						if (!(text2 == "titleitem"))
						{
							goto IL_33E4;
						}
						this.ProcessCommand("item 2097 1");
						this.ProcessCommand("item 301 30");
						this.ProcessCommand("item 302 30");
						this.ProcessCommand("item 303 30");
						this.ProcessCommand("item 304 30");
						goto IL_340B;
					}
				}
				else if (num != 3299020295U)
				{
					if (num != 3319670096U)
					{
						goto IL_33E4;
					}
					if (!(text2 == "anim"))
					{
						goto IL_33E4;
					}
					XAnimator.debug = !XAnimator.debug;
					goto IL_340B;
				}
				else if (!(text2 == "tutorialendall"))
				{
					goto IL_33E4;
				}
				XSingleton<XTutorialMgr>.singleton.CloseAllTutorial();
				this.ProcessCommand("tutorialendcurall");
				goto IL_340B;
			}
			else if (num <= 3723728503U)
			{
				if (num <= 3449438095U)
				{
					if (num <= 3402078869U)
					{
						if (num != 3331625495U)
						{
							if (num != 3363572210U)
							{
								if (num != 3402078869U)
								{
									goto IL_33E4;
								}
								if (!(text2 == "allpk"))
								{
									goto IL_33E4;
								}
								DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_CustomBattle_BountyMode);
								goto IL_340B;
							}
							else
							{
								if (!(text2 == "IgnoreServerOpenDay"))
								{
									goto IL_33E4;
								}
								XActivityDocument specificDocument10 = XDocuments.GetSpecificDocument<XActivityDocument>(XActivityDocument.uuID);
								specificDocument10.ServerOpenDay = 1000;
								goto IL_340B;
							}
						}
						else
						{
							if (!(text2 == "boon"))
							{
								goto IL_33E4;
							}
							DlgBase<XGuildBoonView, XGuildBoonBehaviour>.singleton.SetVisible(true, true);
							goto IL_340B;
						}
					}
					else if (num <= 3412752292U)
					{
						if (num != 3411225317U)
						{
							if (num != 3412752292U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "mzj"))
							{
								goto IL_33E4;
							}
							DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.Show(XSysDefine.XSys_CampDuel, true);
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "stop"))
							{
								goto IL_33E4;
							}
							bool flag73 = array.Length > 1;
							if (flag73)
							{
								int num29 = 0;
								int.TryParse(array[1], out num29);
								int num30 = num29;
								if (num30 != 0)
								{
									if (num30 == 1)
									{
										GameObject gameObject3 = GameObject.Find("UIRoot(Clone)");
										bool flag74 = gameObject3 != null;
										if (flag74)
										{
											gameObject3.SetActive(false);
										}
										gameObject3 = GameObject.Find("HpbarRoot(Clone)");
										bool flag75 = gameObject3 != null;
										if (flag75)
										{
											gameObject3.SetActive(false);
										}
										gameObject3 = GameObject.Find("NpcHpbarRoot");
										bool flag76 = gameObject3 != null;
										if (flag76)
										{
											gameObject3.SetActive(false);
										}
									}
								}
								else
								{
									GameObject gameObject4 = GameObject.Find("XGamePoint");
									bool flag77 = gameObject4 != null;
									if (flag77)
									{
										gameObject4.SetActive(false);
									}
								}
							}
							goto IL_340B;
						}
					}
					else if (num != 3432660476U)
					{
						if (num != 3449438095U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "mzj1"))
						{
							goto IL_33E4;
						}
						XSingleton<XInput>.singleton.LastNpc = XSingleton<XEntityMgr>.singleton.GetNpc(17U);
						goto IL_340B;
					}
					else
					{
						if (!(text2 == "mzj0"))
						{
							goto IL_33E4;
						}
						XSingleton<XInput>.singleton.LastNpc = XSingleton<XEntityMgr>.singleton.GetNpc(165U);
						goto IL_340B;
					}
				}
				else if (num <= 3492411834U)
				{
					if (num != 3466215714U)
					{
						if (num != 3483754705U)
						{
							if (num != 3492411834U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "openurl"))
							{
								goto IL_33E4;
							}
							bool flag78 = array.Length > 1;
							if (flag78)
							{
								Application.OpenURL(array[1]);
							}
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "airuntime"))
							{
								goto IL_33E4;
							}
							int num31 = int.Parse(array[1]);
							XAIComponent.UseRunTime = (num31 != 0);
							XSingleton<XResourceLoaderMgr>.singleton.DelayLoad = XAIComponent.UseRunTime;
							goto IL_340B;
						}
					}
					else
					{
						if (!(text2 == "mzj2"))
						{
							goto IL_33E4;
						}
						XCampDuelDocument.Doc.campID = 2;
						goto IL_340B;
					}
				}
				else if (num <= 3549706178U)
				{
					if (num != 3522024923U)
					{
						if (num != 3549706178U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "setsound"))
						{
							goto IL_33E4;
						}
						XSingleton<XAudioMgr>.singleton.hasSound = !XSingleton<XAudioMgr>.singleton.hasSound;
						goto IL_340B;
					}
					else
					{
						if (!(text2 == "comps"))
						{
							goto IL_33E4;
						}
						XSingleton<XComponentMgr>.singleton.PrintAllComponent();
						goto IL_340B;
					}
				}
				else if (num != 3622053638U)
				{
					if (num != 3723728503U)
					{
						goto IL_33E4;
					}
					if (!(text2 == "kiss"))
					{
						goto IL_33E4;
					}
					XSingleton<XCutScene>.singleton.Start("CutScene/argent_kiss", true, true);
					goto IL_340B;
				}
				else
				{
					if (!(text2 == "authinvalid"))
					{
						goto IL_33E4;
					}
					XSingleton<XLoginDocument>.singleton.OnAuthorizationSignOut("test");
					goto IL_340B;
				}
			}
			else if (num <= 3932305931U)
			{
				if (num <= 3800916422U)
				{
					if (num != 3782316509U)
					{
						if (num != 3792732933U)
						{
							if (num != 3800916422U)
							{
								goto IL_33E4;
							}
							if (!(text2 == "hud"))
							{
								goto IL_33E4;
							}
							XHUDComponent.processHud = !XHUDComponent.processHud;
							goto IL_340B;
						}
						else
						{
							if (!(text2 == "removefriend"))
							{
								goto IL_33E4;
							}
							ulong friendroleid2 = ulong.Parse(array[1]);
							RpcC2M_RemoveFriendNew rpcC2M_RemoveFriendNew = new RpcC2M_RemoveFriendNew();
							rpcC2M_RemoveFriendNew.oArg.friendroleid = friendroleid2;
							XSingleton<XClientNetwork>.singleton.Send(rpcC2M_RemoveFriendNew);
							goto IL_340B;
						}
					}
					else
					{
						if (!(text2 == "getappearance"))
						{
							goto IL_33E4;
						}
						ulong roleid3 = ulong.Parse(array[1]);
						int mask = int.Parse(array[2]);
						RpcC2M_GetUnitAppearanceNew rpcC2M_GetUnitAppearanceNew = new RpcC2M_GetUnitAppearanceNew();
						rpcC2M_GetUnitAppearanceNew.oArg.roleid = roleid3;
						rpcC2M_GetUnitAppearanceNew.oArg.mask = mask;
						XSingleton<XClientNetwork>.singleton.Send(rpcC2M_GetUnitAppearanceNew);
						goto IL_340B;
					}
				}
				else if (num <= 3852368885U)
				{
					if (num != 3835008432U)
					{
						if (num != 3852368885U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "mob"))
						{
							goto IL_33E4;
						}
						uint id4 = uint.Parse(array[1]);
						Quaternion rotation = Quaternion.Euler(0f, 0f, 0f);
						XEntity xentity2 = XSingleton<XEntityMgr>.singleton.CreateEntity(id4, XSingleton<XEntityMgr>.singleton.Player.EngineObject.Position, rotation, true, uint.MaxValue);
						goto IL_340B;
					}
					else
					{
						if (!(text2 == "uiopt"))
						{
							goto IL_33E4;
						}
						bool flag79 = array.Length >= 4;
						if (flag79)
						{
							int num32 = int.Parse(array[1]);
							int num33 = int.Parse(array[2]);
							int num34 = int.Parse(array[3]);
							XSingleton<XGameUI>.singleton.SetUIOptOption(num32 != 0, num33 != 0, num34 != 0, true);
						}
						goto IL_340B;
					}
				}
				else if (num != 3924622254U)
				{
					if (num != 3932305931U)
					{
						goto IL_33E4;
					}
					if (!(text2 == "guilddragon"))
					{
						goto IL_33E4;
					}
					DlgBase<XGuildDragonView, XGuildDragonBehaviour>.singleton.ShowGuildBossView();
					goto IL_340B;
				}
				else if (!(text2 == "niube"))
				{
					goto IL_33E4;
				}
			}
			else if (num <= 4120248703U)
			{
				if (num != 4085338559U)
				{
					if (num != 4117418983U)
					{
						if (num != 4120248703U)
						{
							goto IL_33E4;
						}
						if (!(text2 == "hailong"))
						{
							goto IL_33E4;
						}
						List<string> list2 = new List<string>
						{
							"item 85 100",
							"item 40607 1",
							"item 40608 1",
							"item 40609 1",
							"item 2503001 1",
							"item 2503002 1",
							"item 2503003 1",
							"item 2503004 1",
							"item 2503011 1",
							"item 2503012 1",
							"item 2503013 1",
							"item 2503021 1",
							"item 2503022 1",
							"item 2503031 1",
							"item 2503032 1",
							"item 1000106 10",
							"item 1000206 10",
							"item 1000306 10",
							"item 1000406 10",
							"item 1001106 10",
							"item 1002106 10",
							"item 1003106 10",
							"item 7 100000000"
						};
						XPlayer player = XSingleton<XEntityMgr>.singleton.Player;
						uint typeID = player.TypeID;
						switch (typeID % 10U)
						{
						case 1U:
							list2.Add("item 140600 1");
							list2.Add("item 140601 1");
							list2.Add("item 140602 1");
							list2.Add("item 140603 1");
							list2.Add("item 140604 1");
							list2.Add("item 140605 1");
							list2.Add("item 140606 1");
							break;
						case 2U:
							list2.Add("item 240600 1");
							list2.Add("item 240601 1");
							list2.Add("item 240602 1");
							list2.Add("item 240603 1");
							list2.Add("item 240604 1");
							list2.Add("item 240605 1");
							list2.Add("item 240606 1");
							break;
						case 3U:
							list2.Add("item 340600 1");
							list2.Add("item 340601 1");
							list2.Add("item 340602 1");
							list2.Add("item 340603 1");
							list2.Add("item 340604 1");
							list2.Add("item 340605 1");
							list2.Add("item 340606 1");
							break;
						case 4U:
							list2.Add("item 440600 1");
							list2.Add("item 440601 1");
							list2.Add("item 440602 1");
							list2.Add("item 440603 1");
							list2.Add("item 440604 1");
							list2.Add("item 440605 1");
							list2.Add("item 440606 1");
							break;
						case 5U:
							list2.Add("item 540600 1");
							list2.Add("item 540601 1");
							list2.Add("item 540602 1");
							list2.Add("item 540603 1");
							list2.Add("item 540604 1");
							list2.Add("item 540605 1");
							list2.Add("item 540606 1");
							break;
						}
						foreach (string command2 in list2)
						{
							this.ProcessCommand(command2);
						}
						goto IL_340B;
					}
					else
					{
						if (!(text2 == "setsysredpoint"))
						{
							goto IL_33E4;
						}
						XSingleton<XGameSysMgr>.singleton.SetSysRedPointState((XSysDefine)int.Parse(array[1]), array[2] == "true");
						goto IL_340B;
					}
				}
				else
				{
					if (!(text2 == "gyroon"))
					{
						goto IL_33E4;
					}
					XSingleton<XGyroscope>.singleton.Enabled = true;
					goto IL_340B;
				}
			}
			else if (num <= 4237826497U)
			{
				if (num != 4193803318U)
				{
					if (num != 4237826497U)
					{
						goto IL_33E4;
					}
					if (!(text2 == "capture"))
					{
						goto IL_33E4;
					}
					XSingleton<UiUtility>.singleton.PandoraPicShare("", "", "UIRoot(Clone)/OperatingActivityDlg(Clone)/Bg/Right");
					goto IL_340B;
				}
				else
				{
					if (!(text2 == "AddMaquee"))
					{
						goto IL_33E4;
					}
					int num35 = 0;
					int.TryParse(array[1], out num35);
					for (int num36 = 0; num36 < num35; num36++)
					{
						DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.AddMaqueeNormalInfo(array[2], 0f);
					}
					goto IL_340B;
				}
			}
			else if (num != 4239574328U)
			{
				if (num != 4294409274U)
				{
					goto IL_33E4;
				}
				if (!(text2 == "openfc"))
				{
					goto IL_33E4;
				}
				DlgBase<ProfessionChangeDlg, ProfessionChangeBehaviour>.singleton.SetVisibleWithAnimation(true, null);
				goto IL_340B;
			}
			else
			{
				if (!(text2 == "removefiles"))
				{
					goto IL_33E4;
				}
				XSingleton<XChatIFlyMgr>.singleton.ClearAudioCache();
				goto IL_340B;
			}
			string[] array5 = new string[]
			{
				"level 55",
				"openallsystem",
				"star",
				"task finishall",
				"item 1 900000",
				"item 7 900000",
				"item 9997 1",
				"tutorialendall"
			};
			foreach (string command3 in array5)
			{
				this.ProcessCommand(command3);
			}
			goto IL_340B;
			IL_33E4:
			RpcC2G_GMCommand rpcC2G_GMCommand2 = new RpcC2G_GMCommand();
			rpcC2G_GMCommand2.oArg.cmd = command;
			XSingleton<XClientNetwork>.singleton.Send(rpcC2G_GMCommand2);
			result = true;
			IL_340B:
			return result;
		}

		// Token: 0x0600C74F RID: 51023 RVA: 0x002C6C68 File Offset: 0x002C4E68
		public void SkillLearn(object o = null)
		{
			XSkillTreeDocument specificDocument = XDocuments.GetSpecificDocument<XSkillTreeDocument>(XSkillTreeDocument.uuID);
			bool flag = false;
			for (int i = 10; i <= 1000; i *= 10)
			{
				bool flag2 = (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID < (ulong)((long)(i / 10));
				if (flag2)
				{
					break;
				}
				int profID = (int)(XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID % (uint)i);
				List<uint> profSkillID = XSingleton<XSkillEffectMgr>.singleton.GetProfSkillID(profID);
				for (int j = 0; j < profSkillID.Count; j++)
				{
					bool flag3 = specificDocument.CheckLevelUpButton(profSkillID[j]);
					if (flag3)
					{
						flag = true;
						RpcC2G_SkillLevelup rpcC2G_SkillLevelup = new RpcC2G_SkillLevelup();
						rpcC2G_SkillLevelup.oArg.skillHash = profSkillID[j];
						XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SkillLevelup);
					}
				}
			}
			bool flag4 = flag;
			if (flag4)
			{
				XSingleton<XTimerMgr>.singleton.SetTimer(0.2f, new XTimerMgr.ElapsedEventHandler(this.SkillLearn), null);
			}
			else
			{
				XSingleton<XDebug>.singleton.AddGreenLog("Learn All Skill End.", null, null, null, null, null);
			}
		}

		// Token: 0x0600C750 RID: 51024 RVA: 0x002C6D84 File Offset: 0x002C4F84
		public void GuildCollectNav(object o = null)
		{
			XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
			this._timeToken = XSingleton<XTimerMgr>.singleton.SetTimer(2f, new XTimerMgr.ElapsedEventHandler(this.GuildCollectNav), null);
			bool flag = DlgBase<GuildInheritProcessDlg, GuildInheritProcessBehaviour>.singleton.IsVisible();
			if (flag)
			{
				XSingleton<XInput>.singleton.LastNpc = null;
			}
			else
			{
				bool flag2 = XSingleton<XInput>.singleton.LastNpc != null;
				if (!flag2)
				{
					this.NpcID -= 1U;
					bool flag3 = this.NpcID < 97U;
					if (flag3)
					{
						this.NpcID = 100U;
					}
					XNpc npc = XSingleton<XEntityMgr>.singleton.GetNpc(this.NpcID);
					bool flag4 = npc != null;
					if (flag4)
					{
						XSingleton<XInput>.singleton.LastNpc = npc;
					}
				}
			}
		}

		// Token: 0x0600C751 RID: 51025 RVA: 0x002C6E41 File Offset: 0x002C5041
		public void ClearGuildCollectNav()
		{
			this.ProcessCommand("clearguildcollectCD");
			XSingleton<XInput>.singleton.LastNpc = null;
			XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
		}

		// Token: 0x0600C752 RID: 51026 RVA: 0x002C6E70 File Offset: 0x002C5070
		public void CustomCommand(int index)
		{
			string text = Path.Combine(Application.persistentDataPath, "GM.txt");
			FileInfo fileInfo = new FileInfo(text);
			bool exists = fileInfo.Exists;
			if (exists)
			{
				StreamReader streamReader;
				try
				{
					streamReader = new StreamReader(text, Encoding.Default);
				}
				catch (IOException ex)
				{
					Debug.Log(ex);
					XSingleton<XDebug>.singleton.AddErrorLog("读表失败，请关闭正在打开的表格重试", null, null, null, null, null);
					return;
				}
				bool flag = false;
				while (!streamReader.EndOfStream)
				{
					string text2 = streamReader.ReadLine();
					bool flag2 = text2.Length >= 2;
					if (flag2)
					{
						bool flag3 = text2[0] == '$';
						if (flag3)
						{
							flag = ((int)text2[1] == 48 + index);
							continue;
						}
					}
					bool flag4 = flag;
					if (flag4)
					{
						this.ProcessCommand(text2);
					}
				}
				streamReader.Close();
			}
		}

		// Token: 0x0400578B RID: 22411
		private GameObject terrain = null;

		// Token: 0x0400578C RID: 22412
		private uint _timeToken;

		// Token: 0x0400578D RID: 22413
		private uint NpcID = 97U;
	}
}
